﻿

function SetPassworDefault(userId) {
    $.ajax({
        type: "GET",
        url: "/Employees/SetPassToDefault",
        data: { userId: userId },
        success: function (data) {
            $('#UserPassword').val(data);
            $('#ResetPasswordFormControl').html('<h4><span class="label label-danger"> Password default is ' + data + '</span></h4>');
        },
        error: function (xhr, ajaxOptions, thrownError) {
        }
    });

}
function GetPositionByDepartmentFilter(departmentid)
    {
        $.ajax({
            type: "GET",
            url: "/Employees/GetPositionByDepartmentFilter",
            data: { departmentid: departmentid },
            success: function (data) {
                $("#lbxPosition").html('');
                $.each(data, function (id, option){
                    $("#lbxPosition").append($('<option></option>').val(option.id).html(option.name));
                });
            
            },
            error: function (xhr, ajaxOptions, thrownError) {
            }
        });
    }